/*


 */

package bankserver;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 *
 *
 */
public class AccountServer extends UnicastRemoteObject implements Account {
    private String name;
    private double balance;
    
    public AccountServer() throws RemoteException {
         
    }
    
    public AccountServer(String name) throws RemoteException {
        this.name = name;
    }
    
    public String getName() throws RemoteException {
        return name;
    }

    public Double getBalance() throws RemoteException {
        return balance;
    }

    public void deposit(Double amount) throws RemoteException {
        balance += amount;
    }

    public void withdraw(Double amount) throws RemoteException {
        balance -= amount;
    }

}
